package com.mega.ebcs.integration.route;

import java.util.Properties;

import org.apache.camel.builder.RouteBuilder;

import com.mega.ebcs.integration.pool.TimerPoolDataQueueBean;

public class ResponseHostToFileRoute extends RouteBuilder {
	private TimerPoolDataQueueBean timerPollBean;
	public ResponseHostToFileRoute() {}
	
	public ResponseHostToFileRoute(TimerPoolDataQueueBean timerPollBean, Properties prop){
		this.timerPollBean = timerPollBean;
	}
	
	@Override
	public void configure() throws Exception {
		onException(Exception.class)
		.handled(true)
		.setBody(constant("Unsupported Response Format"));
		from("timer://dataqueue?period=500").bean(timerPollBean, "ebcsConsumerPool");
	}
	
}
